﻿/*----------------------------------------------------------------
// Copyright (C) 2011 上海
// 版权所有。 
//
// 文件名：InstockGroupVM
// 文件功能描述：食材出库VM
//
// 
// 创建标识：2012-1-31 jiangyong
//
// 修改标识：
// 修改描述：
//
//
//----------------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace WaiGaoQiaoWeb.Models
{
    public class OutstockGroupDetailedVM
    {

        public int ID
        {
            get;
            set;
        }


        [DisplayName("出库日期")]
        [Required(ErrorMessage = "出库日期不能为空")]
        public String OutstockDt1
        {
            get;
            set;
        }
     
       
        [DisplayName("仓库")]
        [Required(ErrorMessage = "仓库不能为空")]
        [Range(1, 10000000, ErrorMessage = "请选择仓库")]
        public int Warehouse_ID
        {
            get;
            set;
        }
       
        [DisplayName("班组")]
        [Required(ErrorMessage = "班组不能为空")]
        [Range(1, 10000000, ErrorMessage = "请选择班组")]
        public int Group_ID
        {
            get;
            set;
        }
       
        [DisplayName("食材")]
        [Required(ErrorMessage = "食材不能为空")]
         public int Goods_ID
        {
            get;
            set;
        }
        [DisplayName("数量")]
        [Required(ErrorMessage = "数量不能为空")]
        [RegularExpression(@"^[0-9]+(.[0-9]{0,3})?$", ErrorMessage = "数量必须为正整数或小数")]
        [Remote("OutStockYzh", "OutstockGroup", AdditionalFields = "Con_GoodsInfoId,Count,Price,AddEdit,OldCount", HttpMethod = "POST", ErrorMessage = "库存不足")]
        public decimal Count
        {
            get;
            set;
        }
        [DisplayName("单价")]
        [Required(ErrorMessage = "单价不能为空")]
        [RegularExpression(@"^[0-9]+(.[0-9]{0,3})?$", ErrorMessage = "请填写正确的单价")]
        public decimal Price
        {
            get;
            set;
        }
       
   
     
        [DisplayName("金额")]
        [Required(ErrorMessage = "金额不能为空")]
        //[RegularExpression(@"^[0-9]+(.[0-9]{0,3})?$", ErrorMessage = "请填写正确的金额")]
        public decimal Amount
        {
            get;
            set;
        }
    
        [DisplayName("领用人")]
        public string LeadMan
        {
            get;
            set;
        }
      
      
        public string RecordDateTime1
        {
            get;
            set;
        }
       
        public string OperatorID
        {
            get;
            set;
        }

      
        public string OrderNo
        {
            get;
            set;
        }

        public decimal OldCount
        {
            get;
            set;
        }

        public string AddEdit
        {
            get;
            set;
        }
    }
}